package com.dmz.wxcp.wecom.wxbusiness.entity;


import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;

import java.util.Date;

@Data
@TableName(value = "article")
public class Article {
    @TableId
    @JsonFormat(shape = JsonFormat.Shape.STRING)
    private Long id;

    @TableField(exist = false)
    private ArticleCategory category;
    @TableField(exist = false)
    private String loginName;
    private String title;
    private String content;
    private long userId;
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date createTime;
    //更新时间
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date updateTime;
//    访问量
    private long visitorVolume;
//    浏览量
    private long pageView;
    private String tags;
    private long categoryId;
    @JsonFormat(shape = JsonFormat.Shape.STRING)
    private Long productId;
    private String productName;
    private String images;
    private String mode;
    @TableField(exist = false)
    private String width;
    @TableField(exist = false)
    private String material;
    @TableField(exist = false)
    private String weight;

//    是否在首页展示
    private Boolean isDisplay;
}
